home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tpsqapi1.zip / FIDOFMT.PAS < prev    next >
Pascal/Delphi Source File  |  1992-02-13  |  10KB  |  145 lines

  1. {$A-}
  2. UNIT FIDOFMT;
  3. (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*)
  4. (*%                                                                       %*)
  5. (*%                                                                       %*)
  6. (*%        F I D O   M E S S A G E   S T R U C T U R E                    %*)
  7. (*%                                                                       %*)
  8. (*%                                                                       %*)
  9. (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*)
  10. (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*)
  11. (*                                                                         *)
  12. (* Opus stores and handles its messages in the traditional FTSC FidoNet    *)
  13. (* message format with the exception that additional dating information    *)
  14. (* is added in a set of two 'timestamp' fields that indicate when a        *)
  15. (* message was created and when it arrived on the system and in the use    *)
  16. (* of certain message flags.  The extended use of the flags is done in     *)
  17. (* such a way as to only be of use within the Opus environment and avoids  *)
  18. (* conflict with other systems which adhere to basic FidoNet standards.    *)
  19. (*                                                                         *)
  20. (* In a manner directly descended from the original Fido<tm> BBS system,   *)
  21. (* messages are stored in one or more directories which each correspond    *)
  22. (* to a System Area (topic).  Each message is stored in its own file and   *)
  23. (* has a file name format "#.MSG" where "#" is the assigned number of the  *)
  24. (* message.  The first messages in any given area would be named 1.MSG,    *)
  25. (* 2.MSG, and so on.                                                       *)
  26. (*                                                                         *)
  27. (* Each message file consists of a fixed-length header record, immediately *)
  28. (* followed by a variable-length stream of ASCII text that is terminated   *)
  29. (* by an ASCII NULL (Code 0).  All text is considered to be unformatted    *)
  30. (* and continuous without end-of-line sequences unless they are meant to   *)
  31. (* unconditionally force a new paragraph.  Traditionally, some message     *)
  32. (* editors and BBS's use a  $8D character (CR with 8th bit ON) as a "soft" *)
  33. (* carriage return.  These should be treated as superfluous *unless" they  *)
  34. (* are immediately followed by a space.  In that case, the line that the   *)
  35. (* space starts is considered to be fixed format and should not be word    *)
  36. (* wrapped as all other message text will be.                              *)
  37. (*                                                                         *)
  38. (* The header data contains fixed information about the author, addressee, *)
  39. (* creation and arrival dates, subject, message numbers that it replies to *)
  40. (* or is answered by, privacy flags, and so on.  In the case of messages   *)
  41. (* in a netmail area, there are many special flags used.                   *)
  42. (*                                                                         *)
  43. (*-------------------------------------------------------------------------*)
  44.  
  45.  
  46. (*-------------------------------------------------------------------------*)
  47. (*  TIME STAMP  (Not an FTSC Standard. Unique to Opus)                     *)
  48. (*-------------------------------------------------------------------------*)
  49. (*                                                                         *)
  50. (*  The following _stamp structure is used in Opus message headers to      *)
  51. (*  store a message's creation date (when first written) and the date the  *)
  52. (*  message arrived on the system such as when received via netmail.       *)
  53. (*                                                                         *)
  54. (*  This dating information is auxiliary and used by Opus only. It does    *)
  55. (*  *not* replace the functionality of the FTSC standard ASCII formatted   *)
  56. (*  date field which is also maintained by Opus for compatibility with the *)
  57. (*  rest of the world.                                                     *)
  58. (*                                                                         *)
  59. (*-------------------------------------------------------------------------*)
  60.  
  61. INTERFACE
  62.  
  63. (*--------------------------------------------------------------------------*)
  64. (* msg.h - Message header                                                   *)
  65. (*--------------------------------------------------------------------------*)
  66. type _fido_fromtype    = string[35];
  67.      _fido_totype      = string[35];
  68.      _fido_subtype     = string[71];
  69.      _fido_datetype    = string[19];
  70.  
  71. Type _fidomsgtype =
  72.     record
  73.       from         : _fido_fromtype; (* 0 *)
  74.       towhom       : _fido_totype;   (* 35 *)
  75.       subject      : _fido_subtype;  (* 71 *)
  76.       azdate       : _fido_datetype; (* 142 Obsolete/unused ASCII date information        *)
  77.       timesread    : word;           (* 162 FIDO<tm>: Number of times read                *)
  78.       dest_node    : word;           (* 164 Destination node                              *)
  79.       orig_node    : word;           (* 166 Origination node number                       *)
  80.       cost         : word;           (* 168 Unit cost charged to send the message         *)
  81.       orig_net     : word;           (* 170 Origination network number                    *)
  82.       dest_net     : word;           (* 172 Destination network number                    *)
  83.  
  84.       date_written : longint;        (* 176 When user wrote the msg              *)
  85.       date_arrived : longint;        (* 180 When msg arrived on-line             *)
  86.       reply        : word;           (* 184 Current msg is a reply to this msg number     *)
  87.       attr         : word;           (* 186 Attribute (behavior) of the message           *)
  88.       up           : word;           (* 188 Next message in the thread
  89.    *) end;
  90.  
  91. (*--------------------------------------------------------------------------*)
  92. (* Message attributes                                                       *)
  93. (*--------------------------------------------------------------------------*)
  94.  
  95. Const MSGPRIVATE  = $0001; (* For addressee *ONLY*    * 0000 0000 0000 0001 *)
  96. Const MSGCRASH    = $0002; (* High priority           * 0000 0000 0000 0010 *)
  97. Const MSGREAD     = $0004; (* Was read by addressee   * 0000 0000 0000 0100 *)
  98. Const MSGSENT     = $0008; (* Was sent by FidoMail      0000 0000 0000 1000 *)
  99. Const MSGFILE     = $0010; (* SUBJ=file(s) to send    * 0000 0000 0001 0000 *)
  100. Const MSGFWD      = $0020; (* Msg from & to elsewhere   0000 0000 0010 0000 *)
  101. Const MSGORPHAN   = $0040; (* Msg destination unknown   0000 0000 0100 0000 *)
  102. Const MSGKILL     = $0080; (* Delete after sending    * 0000 0000 1000 0000 *)
  103. Const MSGLOCAL    = $0100; (* Msg is Local, not Net     0000 0001 0000 0000 *)
  104. Const MSGHOLD     = $0200; (* Hold msg for pickup     * 0000 0010 0000 0000 *)
  105. Const MSGCRAP     = $0400; (* ---------------------- X  0000 0100 0000 0000 *)
  106. Const MSGFRQ      = $0800; (* SUBJ=file(s) to get     * 0000 1000 0000 0000 *)
  107. Const MSGRRQ      = $1000; (* Msg Receipt requested  X* 0001 0000 0000 0000 *)
  108. Const MSGCPT      = $2000; (* Msg is a Msg Receipt   X* 0010 0000 0000 0000 *)
  109. Const MSGARQ      = $4000; (* Audit Trail requested  X* 0100 0000 0000 0000 *)
  110. Const MSGURQ      = $8000; (* SUBJ=files(s) to UPD   X* 1000 0000 0000 0000 *)
  111.                                                  (*------------------------*)
  112.                                                  (* ^^                     *)
  113.                                                  (* ||                     *)
  114.                                                  (* ||* = preserved by     *)
  115.                                                  (* ||    the network      *)
  116.                                                  (* ||? = stripped by the  *)
  117.                                                  (* |     net (FTSC spec)  *)
  118.                                                  (* |     but preserved    *)
  119.                                                  (* |     by seadog<tm>    *)
  120.                                                  (* |X  = not used by Opus *)
  121.                                                  (*------------------------*)
  122.  
  123. (*--------------------------------------------------------------------------*)
  124. (* Area attributes (limit or describe the behavior of an area)              *)
  125. (*--------------------------------------------------------------------------*)
  126.  
  127. Const  SYSMAIL      = $0001; (* is a mail area                                *)
  128. Const  P_REP        = $0002; (* OPUS: Net mail private echomail back          *)
  129. Const  NOPUBLIC     = $0004; (* OPUS: Disallow public messages                *)
  130. Const  NOPRIVATE    = $0008; (* OPUS: Disallow private messages               *)
  131. Const  ANON_OK      = $0010; (* OPUS: Enable anonymous messages               *)
  132. Const  ECHOMAIL     = $0020; (* OPUS: Set=Echomail Clear=Not Echomail         *)
  133. Const  OPUS_UALIAS  = $0040; (* OPUS170: Use user's alias in this area        *)
  134. Const  HIGHBIT      = $0040; (* MAX:  Allow high-bit chars in this area       *)
  135. Const  PASSTHROUGH  = $0080; (* OPUS170: Passthough Area only                 *)
  136. Const  INBOUND      = $0100; (* OPUS170: Inbound Only area                    *)
  137. Const  NREALNAME    = $0200; (* MAX:  Don't use ^aREALNAME for this area      *)
  138. Const  USEREALNAME  = $0400; (* MAX:  Use usr.name instead of alias           *)
  139. Const  CONF         = $0800; (* MAX:  Conference-type area (no origin/sb's)   *)
  140. Const  MAX_UALIAS   = $1000; (* MAX:  Use usr.alias instead of usr.name       *)
  141.  
  142. IMPLEMENTATION
  143.  
  144. END.
  145.